import React from 'react';
import type { CascaderProps } from 'antd';
import { Cascader } from 'antd';

interface Option {
    value: string | number;
    label: string;
    children?: Option[];
    disableCheckbox?: boolean;
}

const options: Option[] = [
    {
        label: '河南',
        value: 'HeNan',
        children: [
            {
                label: '郑州市',
                value: '商丘市',

            },
        ],
    },
    {
        label: '新疆',
        value: 'XinJiang',
        children: [
            {
                label: 'A市',
                value: 'B市',

            },
        ],
    },
];

const onChange: CascaderProps<Option, 'value', true>['onChange'] = (value) => {
    console.log(value);
};

const ShippingCity: React.FC = () => (
    <Cascader
        style={{ width: '100%' }}
        options={options}
        onChange={onChange}
        multiple
        maxTagCount="responsive"

    />
);

export default ShippingCity;